<template>
  <transition name="translateXVW">
    <div class="choose" v-show="showCard" v-move="goBack">
      <div class="choose-title" @click="goBack">
        <i class="iconfont iconyoujiantou2"></i> {{ title }}
      </div>
      <div class="choose-content">
        <slot></slot>
      </div>
    </div>
  </transition>
</template>

<script setup lang="ts">
import { ref, defineExpose, defineProps } from "vue";
const props = defineProps({
  title: {
    type: String,
    default: "",
  },
});
const showCard = ref<boolean>(false);
const goBack = () => {
  showCard.value = false;
};
defineExpose({ showCard: showCard });
</script>

<style lang="scss" scoped>
@import url("../css/comment/animate.css");
.choose {
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  background-color: #ffffff;
  &-title {
    font-size: 16px;
    color: $font-color;
    border-bottom: 1px solid $border-color-qian;
    height: 50px;
    line-height: 50px;
    padding-left: 20px;
    font-weight: bold;
    i {
      margin-right: 8px;
    }
  }
  &-content {
    overflow-y: scroll;
    margin-top: 8px;
  }
}
</style>
